UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'A/c50UGIaJxh6k1mHQ0KhGBQ1dWSvRfluFsMzjQVSrs='
WHERE
key_id = '026d144e362d231a7ca3f6ff30b5c9e6e54f74dfe4a127a5c972d5ddc48d2cd2'
AND (
token = 'A/c50UGIaJxh6k1mHQ0KhGBQ1dWSvRfluFsMzjQVSrs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)