UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5t8RYrtG3sYDTxevaLbT4E7IXPWp7eOLT9gRGprD/do='
WHERE
key_id = '67836f2608776c552922116d0ed99519a9b793db0d61989cf9506f6a4357a453'
AND (
token = '5t8RYrtG3sYDTxevaLbT4E7IXPWp7eOLT9gRGprD/do='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)